package com.drojian.demo3.service.remote;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

import androidx.annotation.Nullable;

public class MyRemoteService extends Service {
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.d("xjq", "MyRemoteService  onBind()");
        return new StudentService();
    }

    class StudentService extends IStudentService.Stub{

        @Override
        public Student getStudentById(int id) throws RemoteException {
            return new Student(id,"tom",10000);
        }
    }

}
